Communication apparatus, communication method, communication system, and storage medium

ABSTRACT

A communication apparatus establishes a connection and at least one stream for communication with another communication apparatus, determines a first window size relating to a buffer size for the connection and a second window size relating to a buffer size for the at least one stream based on communication information about communication between the communication apparatus and the other communication apparatus, and transmits to the other communication apparatus the first and second WINDOW_UPDATE frames.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to a communication apparatus configured toperform communication via a communication path, a communication method,a communication system, and a storage medium.

Description of the Related Art

It is common for a client device (hereinafter, “client”) to connect to aremote server via a network to upload images. At this time, anapplication of the client is connected to the remote server using theHypertext Transfer Protocol (HTTP). At the time of the connecting to theremote server, if a buffer size is not set as appropriate, there arisesan issue that a communication band cannot be used effectively. Toovercome the problem, a method has been discussed in which a congestionwindow size is adjusted based on the measurement of a round trip time(RTT) and the cause of a packet loss (Japanese Patent ApplicationLaid-Open No. 2014-90367).

The Internet Engineering Task Force (IETF) has submitted HTTP version 2(HTTP/2), which is the successor of HTTP/1.1. In HTTP/2, a window sizecorresponding to a buffer for performing data transmission/reception isset with respect to both a connection and a stream. In HTTP/2communication based on an initial window size, a communication band maynot be used effectively.

For example, in a case where the technique discussed in Japanese PatentApplication Laid-Open No. 2014-90367 is applied to HTTP/2, aTransmission Control Protocol (TCP) congestion window size can beadjusted. However, the HTTP/2 connection and stream window sizes are notset, so that effective use of a band in the communication is notpossible. This may cause a delay in uploading of images from a client toa server and in downloading images from the server to the client.

For example, in an environment with a delay (RTT) of 30 ms with respectto a window size of 16 kilobytes, the maximum bandwidth is 16 Mbps.Thus, the bandwidth-use efficiency may decrease under high-speed linessuch as common wireless lines of IEEE 802.11n and IEEE 802.11acstandards, cable television lines, optical lines, etc.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, a communicationapparatus includes a connection establishment unit configured toestablish a connection for communication with another communicationapparatus, a stream establishment unit configured to establish at leastone stream for communication with the other communication apparatusbased on the connection established by the connection establishmentunit, a determination unit configured to determine a first window sizerelating to a buffer size for the connection and a second window sizerelating to a buffer size for the at least one stream based oncommunication information about communication between the communicationapparatus and the other communication apparatus, a generation unitconfigured to generate, based on the first window size determined by thedetermination unit, a first WINDOW_UPDATE frame for updating the buffersize of the other communication apparatus for the connection, and togenerate, based on the second window size determined by thedetermination unit, a second WINDOW_UPDATE frame for updating the buffersize of the other communication apparatus for the at least one stream aswell, and a transmission unit configured to transmit to the othercommunication apparatus the first and second WINDOW_UPDATE framesgenerated by the generation unit.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a configuration example of a communication systemaccording to an exemplary embodiment of the present invention.

FIG. 2 illustrates a functional configuration example of thecommunication apparatus according to an exemplary embodiment of thepresent invention.

FIG. 3 illustrates a hardware configuration example of the communicationapparatus according to an exemplary embodiment of the present invention.

FIG. 4 is a flowchart illustrating an operation example of thecommunication apparatus according to an exemplary embodiment of thepresent invention.

FIG. 5 illustrates an example of connection and stream window sizes.

FIG. 6 is a flowchart illustrating an operation example of thecommunication apparatus according to an exemplary embodiment of thepresent invention.

FIG. 7 is a flowchart illustrating an operation example of thecommunication apparatus according to an exemplary embodiment of thepresent invention.

FIG. 8 illustrates a communication operation example to be performedbetween the communication apparatus and a counterpart apparatusaccording to an exemplary embodiment of the present invention.

FIG. 9 illustrates a communication operation example to be performedbetween the communication apparatus and the counterpart apparatusaccording to an exemplary embodiment of the present invention.

FIG. 10 illustrates a communication operation example to be performedbetween the communication apparatus and the counterpart apparatusaccording to an exemplary embodiment of the present invention.

DESCRIPTION OF THE EMBODIMENTS

Various exemplary embodiments of the present invention will be describedbelow with reference to the drawings.

FIG. 1 illustrates a configuration example of a communication systemaccording to an exemplary embodiment of the present invention. In thepresent exemplary embodiment, a communication apparatus 101 and acounterpart apparatus 102 (another communication apparatus 102) areconnected to a network 100, and the communication apparatus 101 performsHypertext Transfer Protocol version 2 (HTTP/2) communication with thecounterpart apparatus 102 via the network 100. Examples of the network100 include the Internet, a wide area network (WAN), a local areanetwork (LAN), and a combination thereof. The communication apparatus101 may communicate with the counterpart apparatus 102 via a proxyserver.

FIG. 2 illustrates a functional configuration example of thecommunication apparatus 101 according to the present exemplaryembodiment. The communication apparatus 101 includes a communicationunit 201, a display unit 202, a connection unit 203, a stream processingunit 204, a judgment unit 205, a delay acquisition unit 206, a bandwidthacquisition unit 207, a determination unit 208, an update transmissionunit 209, and an HTTP processing unit 210. The foregoing functionalunits 201, 202, 203, 204, 205, 206, 207, 208, 209, and 210 arecommunicably connected to each other via a bus 200.

The communication unit 201 performs Transmission Control Protocol overInternet Protocol (TCP/IP) control. The display unit 202 displayscontents and errors. The connection unit 203 generates an HTTP/2connection as a communication path to connect to the counterpartapparatus 102. The stream processing unit 204 is a processing unitconfigured to establish a logical stream on the HTTP/2 connection toperform communication using the stream. The judgment unit 205 judgeswhether to transmit a connection WINDOW_UPDATE and a streamWINDOW_UPDATE to the counterpart apparatus 102. WINDOW_UPDATE is awindow update frame for updating a window size.

The delay acquisition unit 206 measures a delay between thecommunication apparatus 101 and the counterpart apparatus 102. Thebandwidth acquisition unit 207 acquires a communication bandwidthbetween the communication apparatus 101 and the counterpart apparatus102. The determination unit 208 determines a connection window size anda stream window size by use of the delay measured by the delayacquisition unit 206 and the bandwidth acquired by the bandwidthacquisition unit 207. The determination unit 208 may determine a windowsize by use of, for example, a band necessary for the communication of amoving image application, together with communication information suchas a delay and a bandwidth.

The update transmission unit 209 transmits a connection WINDOW_UPDATEand a stream WINDOW_UPDATE. The HTTP processing unit 210 performsprocessing with regard to HTTP/2. For example, the HTTP processing unit210 performs frame processing, header and body processing, processing ofmethods such as HTTP GET and HTTP PUT, etc. that are defined by HTTP/2.

FIG. 3 illustrates a hardware configuration example of the communicationapparatus 101 according to the present exemplary embodiment. Thecommunication apparatus 101 includes a central processing unit (CPU)(processor) 301, a read-only memory (ROM) 302, and a random accessmemory (RAM) 303. The communication apparatus 101 further includes acontroller (CONSC) 305 of an operation unit (CONS) 309 and a displaycontroller (DISPC) 306 of a display (DISP) 310 serving as a displayunit.

The communication apparatus 101 further includes a controller (DCONT)307 of a hard disk (HD) 311 and of a storage device (STD) 312 such as aflexible disk, and a network interface card (NIC) 308. The foregoingfunctional units 301, 302, 303, 305, 306, 307, and 308 are communicablyconnected to each other via a system bus 304.

The CPU 301 executes software stored in the ROM 302 or the HD 311, orsoftware supplied by the STD 312 to comprehensively control each of thefunctional units connected to the system bus 304. Specifically, the CPU301 reads a processing program from the ROM 302, the HD 311, or the STD312 and executes the processing program to perform control so thatoperations according to the present exemplary embodiment are realized.The RAM 303 functions as a main memory, or a work area of the CPU 301.

The CONSC 305 controls input of an instruction from the CONS 309. TheDISPC 306 controls a display on the DISP 310. The DCONT 307 controlsaccess to the HD 311 and the STD 312, which store a boot program,various types of applications, user files, network management programs,and processing programs for realizing operations according to thepresent exemplary embodiment. The NIC 308 performs two-way datatransmission and reception to and from another apparatus (e.g., thecounterpart apparatus 102) on the network 100.

FIG. 4 is a flowchart illustrating an example of operations of thecommunication apparatus 101 according to the present exemplaryembodiment. FIG. 4 illustrates an example of processing to be performedwhen the communication apparatus 101 starts HTTP/2 communication. AnHTTP connection has been established between the communication apparatus101 and the counterpart apparatus 102, and a protocol upgrade byApplication Layer Protocol Negotiation (ALPN) has been completed.Further, the communication apparatus 101 has transmitted HTTP GET to thecounterpart apparatus 102 to request acquisition of image contents.

In step S401, the delay acquisition unit 206 of the communicationapparatus 101 acquires a delay between the communication apparatus 101and the counterpart apparatus 102. The delay acquisition unit 206 maymeasure the delay by transmitting a packet for measuring the delaybetween the communication apparatus 101 and the counterpart apparatus102, or may measure the delay based on the Transmission Control Protocol(TCP) three-way handshaking or HTTP/2 transmitted/received packets.Further, the delay acquisition unit 206 may determine the delay byidentifying areas where the communication apparatus 101 and thecounterpart apparatus 102 are respectively located, based on InternetProtocol (IP) addresses of the communication apparatus 101 and thecounterpart apparatus 102 or fully qualified domain names (FQDNs) of thecommunication apparatus 101 and the counterpart apparatus 102 that areacquired by reverse lookup.

The foregoing are not restrictive examples. In a case where thecommunication apparatus 101 and the counterpart apparatus 102 are bothimmobile apparatuses, a preset delay value may be used. Further, forexample, in a case where the configuration is for Japan, etc., it isexpected to access a fixed server located in Japan from Japan, so thedelay may be set to a fixed value. In this case, while the delay is afixed value, a bandwidth, which will be described below, is a variable.To reduce the processing load, the delay acquisition unit 206 may usethe same delay value during a certain period of time instead ofexecuting the delay measurement each time.

In step S402, the bandwidth acquisition unit 207 of the communicationapparatus 101 acquires a bandwidth between the communication apparatus101 and the counterpart apparatus 102. For example, the bandwidthacquisition unit 207 uses a wired bandwidth, a wireless bandwidth, adynamically measured bandwidth, a preset bandwidth value, or a bandwidthacquired by making an inquiry to a relay apparatus existing on thenetwork 100.

Further, the bandwidth acquisition unit 207 may acquire a bandwidthneeded by a service executed between the communication apparatus 101 andthe counterpart apparatus 102. For example, the bandwidth acquisitionunit 207 may use a bandwidth necessary for moving-image streaming andvoice call, a bandwidth calculated based on a contents size and theperiod of time up to the end of transmission/reception of contents, or abandwidth that is predefined as a necessary bandwidth for the service.

Furthermore, in a case where an end-to-end bandwidth cannot be acquireddue to the existence of a proxy or the like between the communicationapparatus 101 and the counterpart apparatus 102, the bandwidthacquisition unit 207 may use a bandwidth of a part of the communicationpath as a bandwidth between the communication apparatus 101 and thecounterpart apparatus 102. Since a bandwidth needed by an application atthe time of a moving image streaming mode is different from a bandwidthneeded by the same application at the time of an image thumbnail mode,the window size is set as appropriate to each mode.

In step S403, the determination unit 208 of the communication apparatus101 calculates a band-delay product based on the delay acquired in stepS401 and the bandwidth acquired in step S402 by use of Formula 1:bandwidth (bps)×⅛ (byte conversion)×delay (ms)   (Formula 1).

The calculation formula specified as Formula 1 is a mere example, and aparameter such as a fluctuation in the delay or a change in thebandwidth may be included in the calculation of the band-delay product.The communication apparatus 101 may determine the band-delay product by,for example, referring to a table in which delays, bandwidths, andband-delay products are associated.

While the case of using the delay and the bandwidth is described in thepresent exemplary embodiment, this is not a limiting case. Thecalculation may be performed using a request of an application ormiddleware, or a window size needed by an application or middleware maybe requested. Further, in a case where the cause of a bottleneck issomething (application display speed, bus speed, memory size, CPU power,etc.) other than the delay or the bandwidth, if a change cannot be madeto the cause, the determination unit 208 may include the cause as aconstraint condition in the calculation. If a change can be made to thecause, a change request may be transmitted to make a change to thecause.

In step S404, the determination unit 208 determines a connection windowsize. In step S405, the determination unit 208 determines a streamwindow size. In the determination of such window sizes that satisfy theband-delay product in steps S404 and S405, the determination unit 208may take into consideration a fluctuation, or the time up to therendering of the application. Further, the determination unit 208calculates a difference between a current window size and the determinedoptimum window size, and determines a window size for the transmissionof WINDOW_UPDATE (refer to FIG. 5).

FIG. 5 illustrates an example of connection and stream window sizes. Inthe example illustrated in FIG. 5, one connection includes threestreams. For the purpose of description, a window size that satisfies aband-delay product, i.e., a window size that satisfies (band-delayproduct)≤(window size), will be referred to as a necessary window size.As to stream identifiers (IDs), id=0 indicates a connection, and id=1,id=3, and id=5 indicate a stream, respectively. FIG. 5 illustrates anexample of window sizes that are set in a case where the bandwidth is100 Mbps and the delay is 40 ms.

As to the connection (id=0), a necessary window size of 500 kilobytescan be calculated using the calculation formula of Formula 1. As to thestreams (id=1, id=3, and id=5), priorities are specified by theapplication, and bandwidths of 5, 95, and 400 kilobytes are assigned tothe streams, respectively. The assignment to the respective streams maybe performed using the priorities, or the application may preset thenecessary bands or acquire the necessary bands from the counterpartapparatus 102. A current window size of each of the connection (id=0)and the streams (id=1, id=3, and id=5) is 64 kilobytes. While thecurrent window size is set to 64 kilobytes in the present exemplaryembodiment, the default value can be changed by setting an HTTP/2SETTINGS frame.

A difference calculated by subtracting the current window size from thenecessary window size is a window size that is a shortfall with respectto the necessary window size. In a case where the window size isinsufficient, as in the cases of the connection (id=0) and the streams(id=3, and id=5), the updating of the window size by WINDOW_UPDATE isperformed. In this example, the connection (id=0) and the streams (id=3)and (id=5) are 436 kilobytes, 31 kilobytes, and 336 kilobytes,respectively. On the other hand, in a case where the window size issufficient, as in the case of the stream (id=1), the updating of thewindow size by WINDOW_UPDATE is not performed. After the transmission ofWINDOW_UPDATE (WINDOW_UPDATE frame) by the update transmission unit 209,the current window size is changed to the window size transmitted by theupdate transmission unit 209.

In this way, the window size to be updated by WINDOW_UPDATE to satisfythe necessary window size can be determined. While the example in whichonly the parameters of the delay and the bandwidth are used is describedin the present exemplary embodiment to simplify the description,calculation using a fluctuation may be performed as described above.

In a case where a memory for the necessary window size cannot be secureddue to a constrain of the memory of the communication apparatus 101, amaximum window size for which a memory can be secured is set to theconnection (id=0), and a window size that is increased for the streamsis assigned to the respective streams (id=1, id=3, and id=5). The amountof data to be transmitted and received in HTTP/2 communication isdetermined by the connection, so that the connection window size and thestream window sizes do not necessarily have to match. The total amountof the stream window sizes is set larger than the connection window sizeto enable transmission through a stream available for the transmissionwith effective use of the connection window size. Further, in a casewhere it is known that a new stream is to be generated, a largeconnection window size may be assigned in advance. In this way,transmission of WINDOW_UPDATE at the time of generating a new stream canbe decreased.

In step S406, the judgment unit 205 of the communication apparatus 101judges whether to transmit a connection WINDOW_UPDATE. The judgment unit205 checks information specified in the row of the stream ID that isid=0 in FIG. 5, and since there is a size of WINDOW_UPDATE (436kilobytes), the judgment unit 205 judges to transmit a connectionWINDOW_UPDATE (YES in step S406), and the processing proceeds to stepS407. In step S407, the update transmission unit 209 of thecommunication apparatus 101 transmits a connection WINDOW_UPDATE to thecounterpart apparatus 102. On the other hand, in step S406, if thejudgment unit 205 judges to transmit no connection WINDOW_UPDATE (NO instep S406), the processing proceeds to step S408.

Further, in step S406, the judgment unit 205 also judges whether aresource such as a memory can be secured, besides the judgment as towhether there is a size of connection WINDOW_UPDATE. For example, if thejudgment unit 205 judges that a sufficient resource such as a memorycannot be secured, a window size to be specified by WINDOW_UPDATE may beset within a range for which a resource such as a memory can be secured.To simplify the description, hereinafter, the present exemplaryembodiment will be described based on the assumption that the judgmentunit 205 judges that there is a sufficient resource such as a memory atthe time of WINDOW_UPDATE.

In step S408, the judgment unit 205 judges whether to transmit a streamWINDOW_UPDATE. The judgment unit 205 checks information specified in therows of the stream IDs that are id=1, id=3, and id=5 in FIG. 5. Thejudgment unit 205 judges to transmit WINDOW_UPDATEs of id=3 and id=5,each of which has a plus value of the WINDOW_UPDATE size (YES in stepS408), and the processing proceeds to step S409. On the other hand, thejudgment unit 205 judges to transmit no WINDOW_UPDATE of id=1, which hasno WINDOW_UPDATE size (the WINDOW_UPDATE size is not a plus value) (NOin step S408). While there are three streams in the present exemplaryembodiment, in a case where there is only the stream of id=1, thejudgment unit 205 judges to transmit no stream WINDOW_UPDATE, and theprocessing ends.

In step S409, the update transmission unit 209 transmits to thecounterpart apparatus 102 stream WINDOW_UPDATEs associated with thestream IDs that the judgment unit 205 judges to transmit aWINDOW_UPDATE. Then, the processing is ended.

FIG. 6 is a flowchart illustrating an operation example of thecommunication apparatus 101 according to the present exemplaryembodiment. FIG. 6 illustrates an example of processing to be performedin a case where the counterpart apparatus 102 is a communication partnerto which the communication apparatus 101 was connected previously andwindow size determination processing to be performed in thecommunication apparatus 101 is to be reduced.

In step S601, the HTTP processing unit 210 of the communicationapparatus 101 judges whether the counterpart apparatus 102 is acounterpart apparatus to which an HTTP/2 connection was made previously.If the HTTP processing unit 210 judges that the counterpart apparatus102 is a counterpart apparatus to which an HTTP/2 connection was madepreviously (YES in step S601), the processing proceeds to step S602. Onthe other hand, if the HTTP processing unit 210 judges that thecounterpart apparatus 102 is not a counterpart apparatus to which anHTTP/2 connection was made previously (NO in step S601), the processingproceeds to step S603.

In step S602, the determination unit 208 determines a connection windowsize and a stream window size using band-delay products acquired andstored at the time of the previous connection to the counterpartapparatus 102. Thereafter, the update transmission unit 209 transmits aconnection WINDOW_UPDATE and a stream WINDOW_UPDATE to the counterpartapparatus 102, as necessary.

In step S603, the communication apparatus 101 executes the processingillustrated in FIG. 4, and the processing proceeds to step S604. In stepS604, band-delay products calculated in the processing performed in stepS603 are stored, and the processing ends.

While the band-delay product is stored in the present exemplaryembodiment, this is not a restrictive example. For example, delays andbandwidths may be stored and reused, or necessary window sizes may bestored and reused. Further, some of the foregoing parameters may bereused. Reuse of parameters acquired in a previous connection asdescribed above can reduce the processing for the acquisition of anecessary window size and the processing for the determination.

FIG. 7 is a flowchart illustrating an operation example of thecommunication apparatus 101 according to the present exemplaryembodiment. FIG. 7 illustrates an example of processing for the judgmentas to whether to recalculate a window size.

In step S701, the delay acquisition unit 206 checks whether a delaybetween the communication apparatus 101 and the counterpart apparatus102 is changed. If the delay acquisition unit 206 judges that the delayis changed (YES in step S701), the processing proceeds to step S703. Onthe other hand, if the delay acquisition unit 206 judges that the delayis not changed (NO in step S701), the processing proceeds to step S702.

In step S702, the bandwidth acquisition unit 207 checks whether abandwidth between the communication apparatus 101 and the counterpartapparatus 102 is changed. If the bandwidth acquisition unit 207 judgesthat the bandwidth is changed (YES in step S702), the processingproceeds to step S703. On the other hand, if the bandwidth acquisitionunit 207 judges that the bandwidth is not changed (NO in step S702), theprocessing proceeds to step S704.

In the judgments performed by the delay acquisition unit 206 and thebandwidth acquisition unit 207 in steps S701 and S702, respectively, thedelay acquisition unit 206 or the bandwidth acquisition unit 207 maycompare values and judge that the delay or bandwidth is changed, if adifference is equal to or larger than a predetermined level.Alternatively, the delay acquisition unit 206 or the bandwidthacquisition unit 207 may judge that the delay or bandwidth is changed,only if the necessary window size increases (only if the delay and thebandwidth increase).

In step S703, the determination unit 208 acquires a current delay and acurrent bandwidth from the delay acquisition unit 206 and the bandwidthacquisition unit 207, respectively, and recalculates a band-delayproduct. The band-delay product may be calculated using, for example,Formula 1 as in step S403 illustrated in FIG. 4.

In step S704, the HTTP processing unit 210 stands by for a certainperiod of time. The standby time may be a predefined time, or aninterval may be changed according to the frequency of change in delay orbandwidth. In step S705, the HTTP processing unit 210 judges whether theconnection to the counterpart apparatus 102 is disconnected. If the HTTPprocessing unit 210 judges that the HTTP connection is disconnected (YESin step S705), the processing ends. On the other hand, if the HTTPprocessing unit 210 judges that the HTTP connection is still connected(NO in step S705), the processing returns to step S701.

In this way, the window sizes can be recalculated in the communicationapparatus 101 being in operation, and WINDOW_UPDATE suitable for achanging parameter can be transmitted. The communication apparatus 101can perform communication without securing an unnecessary resource whilea window size satisfying a band-delay product is secured. While theexample in which the delay and the band are checked is described in thepresent exemplary embodiment to simplify the description, this is not arestrictive example. The exemplary embodiment of the present inventionis also applicable to a case where the cause of a change in window sizeis changed, such as a fluctuation, a change in a request of anapplication, a memory, etc.

The following describes an example of communication operations performedbetween the communication apparatus 101 and the counterpart apparatus102 according to the present exemplary embodiment.

<Case where Contents are Acquired by HTTP GET Method>

FIG. 8 illustrates an example of a sequence of a case where acquisitionof contents is performed by HTTP GET method between the communicationapparatus 101 and the counterpart apparatus 102 according to the presentexemplary embodiment. To simplify the description, only the stream ofid=5 will be described below. A case where there are the streams of id=1and id=3 is different in that stream WINDOW_UPDATEs corresponding to therespective stream IDs are transmitted. The connection window size may betransmitted periodically or may be transmitted at each total value ofstream WINDOW_UPDATEs, or at the time of transmitting each streamWINDOW_UPDATE.

In M801, the communication apparatus 101 establishes a Transport LayerSecurity (TLS) connection to the counterpart apparatus 102, and upgradesthe protocol from HTTP/1.1 to HTTP/2. Then, in M802, the communicationapparatus 101 transmits an HTTP GET message with a HEADERS frame to thecounterpart apparatus 102. In M803, the counterpart apparatus 102transmits 200 OK, which is a response to the HTTP GET message, with aHEADERS frame to the communication apparatus 101.

In M804, the communication apparatus 101 acquires a delay between thecommunication apparatus 101 and the counterpart apparatus 102. In M805,the communication apparatus 101 acquires a bandwidth between thecommunication apparatus 101 and the counterpart apparatus 102. Then, inM806, the communication apparatus 101 calculates a band-delay productbetween the communication apparatus 101 and the counterpart apparatus102 by use of the acquired delay and the acquired bandwidth.

In M807, the communication apparatus 101 determines the connectionwindow size of the HTTP/2 connection connected between the communicationapparatus 101 and the counterpart apparatus 102. Further, in M808, thecommunication apparatus 101 determines the stream window size of astream for the communication on the HTTP/2 connection connected betweenthe communication apparatus 101 and the counterpart apparatus 102.

In M809, the communication apparatus 101 judges whether to transmit aconnection WINDOW_UPDATE to the counterpart apparatus 102. If thecommunication apparatus 101 judges to transmit a connectionWINDOW_UPDATE, then in M810, the communication apparatus 101 transmits aconnection WINDOW_UPDATE to the counterpart apparatus 102. Further, inM811, the communication apparatus 101 judges whether to transmit astream WINDOW_UPDATE to the counterpart apparatus 102. If thecommunication apparatus 101 judges to transmit a stream WINDOW_UPDATE tothe counterpart apparatus 102, then in M812, the communication apparatus101 transmits a stream WINDOW_UPDATE to the counterpart apparatus 102.

Then, in M813, the communication apparatus 101 receives an HTTP bodyportion, which is a response to the HTTP GET message, from thecounterpart apparatus 102. For example, the communication apparatus 101receives image contents from the counterpart apparatus 102.

When the communication apparatus 101 receives the HTTP body portion fromthe counterpart apparatus 102, the window size decreases (the currentwindow size specified in FIG. 5 is decreased by the data size). In M814,the communication apparatus 101 determines a connection window sizeagain and judges whether to transmit a connection WINDOW_UPDATE. If thecommunication apparatus 101 judges to transmit a connectionWINDOW_UPDATE, then in M815, the communication apparatus 101 transmits aconnection WINDOW_UPDATE to the counterpart apparatus 102.

Further, in M816, the communication apparatus 101 determines a streamwindow size again and judges whether to transmit a stream WINDOW_UPDATE.If the communication apparatus 101 judges to transmit a streamWINDOW_UPDATE, then in M817, the communication apparatus 101 transmits astream WINDOW_UPDATE to the counterpart apparatus 102.

While the determination is performed again using the stored band-delayproducts according to the processing illustrated in FIG. 6 in thepresent exemplary embodiment, this is not a limiting case. Theacquisition of a delay and a bandwidth may be performed again as in theprocessing illustrated in FIG. 7. Whether to change to the processingillustrated in FIG. 6 or to the processing illustrated in FIG. 7 doesnot have to be checked every time, and the processing illustrated inFIG. 6 and the processing illustrated in FIG. 7 may be switched at acertain time or every certain number of times.

In M818, the communication apparatus 101 receives a continued HTTP bodyportion from the counterpart apparatus 102. In M819, the communicationapparatus 101 receives a further continued HTTP body portion from thecounterpart apparatus 102.

In M820, the communication apparatus 101 determines the connectionwindow size again and judges whether to transmit a connectionWINDOW_UPDATE. In the present exemplary embodiment, the communicationapparatus 101 judges to transmit no connection WINDOW_UPDATE to thecounterpart apparatus 102. Further, in M821, the communication apparatus101 judges to transmit no stream WINDOW_UPDATE to the counterpartapparatus 102. For example, the communication apparatus 101 can judge totransmit no WINDOW_UPDATE if the judgment unit 205 judges that a windowsize that satisfies the band-delay product is still assigned. Further,the communication apparatus 101 can judge to transmit no WINDOW_UPDATE,if the contents length is known from ContentLength contained in the HTTPheader and a window size that is sufficient enough is already assigned.

While two messages are received in M818 and M819 in the foregoingexample, this is not a restrictive example. Alternatively, theprocessing may proceed to M820 and M821 once one message is received(only in M818). Further, in a case where the judgment unit 205 judgesthat the window size still has a margin or in a case where thedetermination unit 208 determines the window size with a margin inadvance, the processing may proceed to M820 and M821 at the reception ofnot two but three or more messages.

Then, in M822, the communication apparatus 101 receives the rest of theHTTP body portion and END STREAM from the counterpart apparatus 102. Thecommunication apparatus 101 displays the acquired image contents using,for example, the display unit 202. The display unit 202 may display notonly image contents but also HTTP headers, etc. Further, the displayunit 202 may display a connection error that occurred during thetransmission and reception.

The communication apparatus 101 does not transmit a WINDOW_UPDATE in acase where the connection between the communication apparatus 101 andthe counterpart apparatus 102 is disconnected, but in a case where theconnection is not disconnected, the communication apparatus 101 maytransmit a connection WINDOW_UPDATE to the counterpart apparatus 102 inM823 after M822. In this way, WINDOW_UPDATE at the time of generating anew stream is transmitted in advance so that the speed increases. Theconnection WINDOW_UPDATE may be transmitted alone or may collectively beprocessed at the time of updating connection WINDOW_UPDATE generatedduring the processing of another stream.

<Case where Contents are Uploaded by HTTP PUT Method>

FIG. 9 illustrates an example of a sequence of a case where thecounterpart apparatus 102 uploads contents to the communicationapparatus 101 by HTTP PUT method according to the present exemplaryembodiment.

In M901, the communication apparatus 101 establishes a TLS connection tothe counterpart apparatus 102, and upgrades the protocol from HTTP/1.1to HTTP/2. Then, in M902, the counterpart apparatus 102 transmits to thecommunication apparatus 101 an HTTP PUT message with a HEADERS framecontaining 100-continue in the Expect header. In M903, the counterpartapparatus 102 transmits 100 CONTINUE, which is a provisional response tothe HTTP PUT message, with a HEADERS frame to the communicationapparatus 101.

In this way, the communication apparatus 101 notifies the counterpartapparatus 102 that the communication apparatus 101 is to receivetransmission of contents from the counterpart apparatus 102. In a casewhere the communication apparatus 101 cannot receive the upload ofcontents by HTTP PUT method from the counterpart apparatus 102, thecommunication apparatus 101 returns an error, and the processing ends.M904 to M912 are similar to M804 to M812 illustrated in FIG. 8, sodescription of M904 to M912 is omitted.

In M913, the communication apparatus 101 receives a body portion of theHTTP PUT message from the counterpart apparatus 102. In M914, thecommunication apparatus 101 receives a continued HTTP body portion fromthe counterpart apparatus 102. For example, the body portion of the HTTPPUT message contains image contents. M915 to M918 are similar to M814 toM817 illustrated in FIG. 8, so description of M915 to M918 is omitted.

In M919, the communication apparatus 101 receives a continued HTTP bodyportion from the counterpart apparatus 102. In M920, the communicationapparatus 101 receives a further continued HTTP body portion from thecounterpart apparatus 102. M921 and M922 are similar to M820 and M821illustrated in FIG. 8, so description of M921 and M922 is omitted.

In M923, the communication apparatus 101 receives the rest of the HTTPbody portion from the counterpart apparatus 102. In M924, thecommunication apparatus 101 transmits HTTP 200 OK and END STREAM to thecounterpart apparatus 102. The communication apparatus 101 may display,for example, contents uploaded from the counterpart apparatus 102 by useof the display unit 202. The display unit 202 may display not only imagecontents but also HTTP headers, etc. Further, the display unit 202 maydisplay connection errors that occurred during the transmission andreception.

As described, the present exemplary embodiment enables effective use ofbandwidths and resources in the communication between the communicationapparatus 101 and the counterpart apparatus 102. The communicationapparatus 101 transmits a WINDOW_UPDATE before receiving an HTTP bodyportion so that the window size can be increased before the HTTP bodyportion is received, whereby the throughput increases.

While the HTTP/2 window size is changed in the present exemplaryembodiment, a band-delay product may further be combined with a buffersize of a protocol of another layer such as TCP. In this way, acommunication apparatus performing HTTP/2 communication can reduce adecrease in speed that is caused by insufficient buffer size in anotherlayer. Further, in a case where a resource, such as a memory, isinsufficient, the resource may be assigned equally to the HTTP/2 windowsize and protocols of other layers instead of assigning the resourceonly to the HTTP/2 window size, so that the performance can be improved.

While the foregoing describes the HTTP GET message and the HTTP PUTmessage as examples, these are not restrictive examples. An exemplaryembodiment of the present invention is also applicable to cases of otherHTTP methods in which a body portion is contained (POST method, etc.).Moreover, while the foregoing describes the HTTP processing as anexample, this is not a restrictive example. An exemplary embodiment ofthe present invention is also applicable to a protocol for transmissioncontrol in request-response communication.

According to the present exemplary embodiment, in a case where, forexample, a requested bandwidth (24 Mbps) of moving image streaming isset, the communication apparatus 101 can receive contents data at highspeed with a suitable window size. In this way, the buffering time ofthe moving image streaming at the rise can be decreased. Further, adecrease in performance (noise, slow start, drop frame, etc.) due to alack of the requested bandwidth at the start of the moving imagestreaming before the transmission of WINDOW_UPDATE can be decreased.Furthermore, since the window size is not excessively increased, adecrease in performance as a product can be reduced without burdening amemory of an application (e.g., image processing or a user interface)other than communication control.

The following describes a case where a plurality of streams is processedon a single connection between the communication apparatus 101 and thecounterpart apparatus 102. FIG. 10 illustrates an example of a sequenceof a case where the communication apparatus 101 acquires contents fromthe counterpart apparatus 102 with a plurality of HTTP GET messagesaccording to the present exemplary embodiment.

In M1001, the communication apparatus 101 establishes a TLS connectionto the counterpart apparatus 102, and upgrades the protocol fromHTTP/1.1 to HTTP/2. Then, the communication apparatus 101 starts threestreams (id=1, id=3, and id=5) on the connection between thecommunication apparatus 101 and the counterpart apparatus 102.

In M1002, the communication apparatus 101 transmits an HTTP GET messageto the counterpart apparatus 102 by use of a stream 1 (hereinafter, astream in a case where id=1 will be referred to as “stream 1”) toacquire image contents. In M1003, the communication apparatus 101receives a 200 OK response from the counterpart apparatus 102. Further,in M1004, the communication apparatus 101 transmits an HTTP GET messageto the counterpart apparatus 102 by use of a stream 3 (hereinafter, astream in a case where id=3 will be referred to as “stream 3”) toacquire image contents. In M1005, the communication apparatus 101receives a 200 OK response from the counterpart apparatus 102.Furthermore, in M1006, the communication apparatus 101 transmits an HTTPGET message to the counterpart apparatus 102 by use of a stream 5(hereinafter, a stream in a case where id=5 will be referred to as“stream 5”) to acquire image contents. In M1007, the communicationapparatus 101 receives a 200 OK response from the counterpart apparatus102.

Then, in M1008, the communication apparatus 101 determines theconnection window size and the stream window sizes. In this example, theconnection window size and the plurality of stream window sizes arecollectively determined to reduce the amount of common processing suchas the calculation of a band-delay product. Alternatively, only a partof the processing of the determination of the connection window size andthe plurality of stream window sizes may be executed collectively. Forexample, only the processing of the streams 1, 3, and 5 may be executedcollectively.

In M1009, the communication apparatus 101 transmits a connectionWINDOW_UPDATE. Further, in M1010 to M1012, the communication apparatus101 transmits stream WINDOW_UPDATEs for the streams 1, 3, and 5,respectively. While the communication apparatus 101 transmits the streamWINDOW_UPDATEs after the connection WINDOW_UPDATE in the foregoingexample, this is not a restrictive example. The stream WINDOW_UPDATEsmay be transmitted first. Alternatively, there may be a case where ajudgment to transmit no WINDOW_UPDATE is made.

In M1013 to M1015, the communication apparatus 101 receives HTTP bodyportions of the streams 1, 3, and 5 from the counterpart apparatus 102.Then, in M1016, the communication apparatus 101 determines theconnection window size and the stream window sizes. In the presentexemplary embodiment, the communication apparatus 101 judges to transmitneither a connection WINDOW_UPDATE nor WINDOW_UPDATEs for the streams 1,3, and 5.

For example, in a case where the stream 1 is a Hypertext Markup Language(HTML) index and two images are being downloaded through the streams 3and 5 (in the case of this example, the body portion of the stream 1 hasbeen acquired prior to the start of the streams 3 and 5), since the HTMLindex does not involve other images or acquisition from a resource, theconnection between the communication apparatus 101 and the counterpartapparatus 102 ends. No new stream is to be generated after the stream 5,so it can be judged that WINDOW_UPDATE does not have to be transmitted.As the foregoing describes, the judgment as to whether to transmit aWINDOW_UPDATE from an application can be performed.

For another example, in a case where a list of image contents has beenalready acquired and an application acquires three contents (streams 1,3, and 5), no new stream is to be generated. Accordingly, it can bejudged that WINDOW_UPDATE does not have to be transmitted.

In M1017 to M1019, the communication apparatus 101 receives the rest ofthe HTTP body portion of each of the streams 1, 3, and 5 and END STREAMfrom the counterpart apparatus 102. In M1020, the communicationapparatus 101 disconnects the HTTP/2 connection between thecommunication apparatus 101 and the counterpart apparatus 102, and thendisconnects the TLS connection.

As described above, the example illustrated in FIG. 10 can reduce windowsize determining processing in the case where a plurality of streams isexecuted. Further, execution of the judgment as to whether to transmitWINDOW_UPDATE in response to a request from an application can reducethe overhead of the WINDOW_UPDATE transmission processing. While FIG. 10is illustrated based on the example illustrated in FIG. 8, applicationto the example illustrated in FIG. 9 is also possible.

The disclosed exemplary embodiments illustrate mere examples ofimplementation of the invention, and the technical scope of theinvention should not be interpreted restrictively to the disclosedexemplary embodiments. In other words, an exemplary embodiment of thepresent invention can be implemented in various forms without departingfrom the technical spirit or principal feature of the invention.

A configuration of an exemplary embodiment of the present inventionenables communication with effective use of a band in a case where thecommunication is performed using a connection and a stream.

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2015-159483, filed Aug. 12, 2015, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A communication apparatus comprising: at leastone hardware processor; and a memory which stores instructionsexecutable by the at least one hardware processor to cause thecommunication apparatus to perform at least: establishing a connectionfor communication with another communication apparatus; establishing atleast one stream based on the connection for communication with theanother communication apparatus; determining, by using communicationinformation associated with speed of communication between thecommunication apparatus and the another communication apparatus, a firstwindow size corresponding to a size of a buffer for communicationthrough the connection with the another communication apparatus and asecond window size corresponding to a size of a buffer for communicationthrough a stream of the at least one stream with the anothercommunication apparatus; deciding, based on the first window sizedetermined by using the communication information associated with thespeed of communication between the communication apparatus and theanother communication apparatus, transmission timing of a first controlframe for controlling a size of data to be transmitted from the anothercommunication apparatus through the connection; transmitting, accordingto the transmission timing decided, the first control frame generatedbased on the first window size determined; and transmitting a secondcontrol frame for controlling a size of data to be transmitted from theanother communication apparatus through the stream, wherein the secondcontrol frame is generated based on the second window size determined.2. The communication apparatus according to claim 1, wherein theinstructions further cause the communication apparatus to perform:deciding, based on the second window size determined by using thecommunication information associated with the speed of communicationbetween the communication apparatus and the another communicationapparatus, transmission timing of the second control frame.
 3. Thecommunication apparatus according to claim 2, wherein the transmissiontiming of the second control frame decided in a case where the secondwindow size is larger than a preset window size of the stream is earlierthan the transmission timing of the second control frame decided in acase where the second window size determined is smaller than the presetwindow size of the stream.
 4. The communication apparatus according toclaim 1, wherein the transmission timing of the first control framedecided in a case where the first window size determined is larger thana preset window size of the connections earlier than the transmissiontiming of the first control frame decided in a case where the firstwindow size determined is smaller than the preset window size of theconnection.
 5. The communication apparatus according to claim 4,wherein, in a case where the first window size determined is larger thanthe preset window size of the connection, the first control frame istransmitted before the communication apparatus receives a body of a HTTPmessage from the another communication apparatus through the connection,and wherein, in a case where the first window size determined is smallerthan the preset window size of the connection, the first control frameis transmitted after the communication apparatus receives at least aspecific amount of body of a HTTP message from the another communicationapparatus through the connection, wherein the specific amount isdetermined based on the first window size.
 6. The communicationapparatus according to claim 1, wherein the communication informationincludes at least one of a bandwidth and a delay of a communication pathbetween the communication apparatus and the another communicationapparatus.
 7. The communication apparatus according to claim 1, whereinthe communication information includes a bandwidth and a delay of acommunication path between the communication apparatus and the anothercommunication apparatus, and wherein the first window size and thesecond window size are determined based on a band-delay productcalculated based on the bandwidth and the delay.
 8. The communicationapparatus according to claim 1, wherein the first control frame and thesecond control frame are generated according to a frame format definedby HTTP/2.
 9. The communication apparatus according to claim 1, whereinthe first control frame and the second control frame are WINDOW_UPDATEframes defined by HTTP/2.
 10. The communication apparatus according toclaim 1, wherein the second control frame is a SETTINGS frame defined byHTTP/2.
 11. The communication apparatus according to claim 1, wherein aTCP connection is established as the connection, and wherein a HTTP/2stream based on the TCP connection is established as the stream.
 12. Thecommunication apparatus according to claim 1, wherein the first controlframe indicates a size of data that the another communication apparatuscan transmit in addition to an existing window of the connection, andwherein the second control frame indicates a size of data that theanother communication apparatus can transmit in addition to an existingwindow of the stream.
 13. A communication method to be performed by acommunication apparatus, the communication method comprising:establishing a connection for communication with another communicationapparatus; establishing at least one stream based on the connection forcommunication with the another communication apparatus; determining, byusing communication information associated with speed of communicationbetween the communication apparatus and the another communicationapparatus, a first window size corresponding to a size of a buffer forcommunication through the connection with the another communicationapparatus and a second window size corresponding to a size of a bufferfor communication through a stream of the at least one stream with theanother communication apparatus; deciding, based on the determined firstwindow size determined by using the communication information associatedwith the speed of communication between the communication apparatus andthe another communication apparatus, transmission timing of a firstcontrol frame for controlling a size of data to be transmitted from theanother communication apparatus through the connection; transmitting,according to the transmission timing decided, the first control framegenerated based on the first window size determined; and transmitting asecond control frame for controlling a size of data to be transmittedfrom the another communication apparatus through the stream, wherein thesecond control frame is generated based on the second window sizedetermined.
 14. A communication system in which a first communicationapparatus and a second communication apparatus are connected to eachother via a network, the first communication apparatus comprising: aconnection establishment unit configured to establish a connection forcommunication between the first communication apparatus and the secondcommunication apparatus; a stream establishment unit configured toestablish at least one stream based on the connection for communicationbetween the first communication apparatus and the second communicationapparatus; a determination unit configured to determine, by usingcommunication information associated with speed of communication betweenthe first communication apparatus and the second communicationapparatus, a first window size corresponding to a size of a buffer forcommunication through the connection and a second window sizecorresponding to a size of a buffer for communication through a streamof the at least one stream; a decision unit configured to decide, basedon the first window size determined by the determination unit by usingthe communication information associated with the speed of communicationbetween the communication apparatus and the another communicationapparatus, transmission timing of a first control frame for controllinga size of data to be transmitted from the second communication apparatusthrough the connection; and a first transmission unit configured totransmit, according to the transmission timing decided, the firstcontrol frame generated based on the first window size determined andtransmit a second control frame for controlling a size of data to betransmitted from the another communication apparatus through the stream,wherein the second control frame is generated based on the second windowsize determined by the generation unit, and the second communicationapparatus comprising: a receiving unit configured to receive the firstcontrol frame and the second control frame transmitted by the firsttransmission unit; and a second transmission unit configured to transmitdata to the first communication apparatus through the stream based onthe connection according to the first control frame and the secondcontrol frame received by the receiving unit.
 15. A computer-readablestorage medium storing a computer program for causing a computer toexecute a communication method, the method comprising: establishing aconnection for communication with another communication apparatus;establishing at least one stream based on the connection forcommunication with the another communication apparatus; determining, byusing communication information associated with speed of communicationbetween the communication apparatus and the another communicationapparatus, a first window size corresponding to a size of a buffer forcommunication through the connection with the another communicationapparatus and a second window size corresponding to a size of a bufferfor communication through a stream of the at least one stream with theanother communication apparatus; deciding, based on the determined firstwindow size by using the communication information associated with thespeed of communication between the communication apparatus and theanother communication apparatus, transmission timing of a first controlframe for controlling a size of data to be transmitted from the anothercommunication apparatus through the connection; transmitting, accordingto the transmission timing decided, the first control frame generatedbased on the first window size determined; and transmitting a secondcontrol frame for controlling a size of data to be transmitted from theanother communication apparatus through the stream, wherein the secondcontrol frame is generated based on the second window size determined.